import 'package:flutter/cupertino.dart';

class IosDialogPage extends StatefulWidget {
  const IosDialogPage({Key? key}) : super(key: key);

  @override
  _IosDialogPageState createState() => _IosDialogPageState();
}

class _IosDialogPageState extends State<IosDialogPage> {
  @override
  Widget build(BuildContext context) {
    return Container();
  }

  // CupertinoPageScaffold(

  //     navigationBar: ObstructingPreferredSizeWidget(),
  //     child:
  //         ElevatedButton(
  //           child: Text("IOSDialog"),
  //           onPressed: () {
  //             showIOSDialogDemo(page: this.widget, context: context);
  //           },
  //         ),
  //   );
}

void showIOSDialogDemo({IosDialogPage? page, context}) async {
  showCupertinoDialog(
      context: context,
      builder: (context) {
        return CupertinoAlertDialog(
        
          title: const Text('提示'),
          content: const Text('确认删除吗？'),
          actions: <Widget>[
            CupertinoDialogAction(
              child: const Text('取消'),
              onPressed: () {
                Navigator.pop(context,);
                // Get.back(result: "取消");
              },
            ),
            CupertinoDialogAction(
              child: const Text('确认'),
              onPressed: () {
                Navigator.pop(context,);
                // Get.back(result: "确认");
              },
            ),
          ],
        );
      });
}
